package com.info.zhiduoduo.repository.mapper.crm;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.info.zhiduoduo.repository.dto.crm.PartnerKpiDto;
import com.info.zhiduoduo.repository.entity.crm.CrmKpi;

import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 绩效考核 Mapper 接口
 * </p>
 *
 * @author bob
 * @since 2020-04-25
 */
public interface CrmKpiMapper extends BaseMapper<CrmKpi> {

	@Select(" select * from zdd_crm_kpi " +
			" where kpi_type = 2 and check_id = #{partnerid} " +
			" order by id desc limit 1")
	PartnerKpiDto getPartnerKpi(int partnerid);
}
